<%--

--%>

<%@ page contentType="text/html;charset=UTF-8" %>
<html>
  <head>
    <title>Guganville</title>
     <meta name="layout" content="main" />
  </head>
  <body>
  <g:if test="${issues}">
  <H1>
    Your Issues
  </H1>


    <div class="list">
                <table>
                    <thead>
                        <tr>

                            <g:sortableColumn property="id" title="${message(code: 'issue.id.label', default: 'Id')}" />

                            <g:sortableColumn property="title" title="${message(code: 'issue.title.label', default: 'Title')}" />

                            <g:sortableColumn property="priority" title="${message(code: 'issue.priority.label', default: 'Priority')}" />

                            <g:sortableColumn property="status" title="${message(code: 'issue.status.label', default: 'Status')}" />

                            <g:sortableColumn property="type" title="${message(code: 'issue.type.label', default: 'Severity')}" />


                            <g:sortableColumn property="lastUpdated" title="${message(code: 'issue.lastUpdated.label', default: 'Last Updated')}" />

                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${issues}" status="i" var="issueInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">

                            <td><g:link action="show" controller="issue" id="${issueInstance.id}">${fieldValue(bean: issueInstance, field: "id")}</g:link></td>

                            <td>${fieldValue(bean: issueInstance, field: "title")}</td>

                            <td><g:priorityLevel level="${issueInstance.priority}" /></td>

                            <td><g:issueStrtus status="${issueInstance.status}" /></td>

                           <td><g:issueType type="${issueInstance.type}" /></td>

                            <td>${fieldValue(bean: issueInstance, field: "lastUpdated")}</td>

                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>


  </g:if>
   <g:if test="${!issues}">
   <H1>
     You Have no Issues
   </H1>

   </g:if>


  </body>
</html>